using System;
using System.Collections.Generic;

namespace Nairo.Parser.Dom
{
	public abstract class AbstractCSSElement
	{
		// TODO : Extend for multiple tags (string[])
		protected string selector;
		protected List<CSSAttribute> attributes;
		
		public CSSAttribute[] Attributes {
			get { return attributes.ToArray(); }
		}
		
		protected FileUnit file;
		
		public string Selector {
			get { return selector; }
		}
		
		public AbstractCSSElement()
			: this("dummy", new List<CSSAttribute>(), null)
		{
		}
		
		public AbstractCSSElement(string selector, List<CSSAttribute> attributes, FileUnit file)
		{
			this.selector = selector;
			this.attributes = attributes;
			this.file = file;
		}
		
		public abstract CSSAttribute GetAttribute(string name);
		
		public abstract void SetAttribute(string name, object value);
	}
}
